package com.smallpineapple.turing.service.guest.impl;

import com.smallpineapple.turing.dao.AwardDao;
import com.smallpineapple.turing.entity.Award;
import com.smallpineapple.turing.service.guest.AwardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Jack
 * @date 2019-06-28-9:43
 */
@Service
public class AwardServiceimpl implements AwardService {

    @Autowired
    AwardDao awardDao;

    @Override
    public List<Award> findAllAwards() {

        List<Award> awards = awardDao.findAll();
        return awards;

    }

    @Override
    public Award findAwardByAwardId(Long awardId) {
        Award dbAward = awardDao.getOne(awardId);
        return dbAward;
    }
}
